package com.xqzgj.stock.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.xqzgj.common.annotation.Excel;
import com.xqzgj.common.core.domain.BaseEntity;

/**
 * 库存变动记录对象 inventory_log
 * 
 * @author zhoujiam
 * @date 2025-03-31
 */
public class InventoryLog extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 记录ID */
    private Long id;

    /** 商品ID */
    @Excel(name = "商品ID")
    private Long productId;

    /** 变动数量（正数为增加，负数为减少） */
    @Excel(name = "变动数量", readConverterExp = "正=数为增加，负数为减少")
    private Long changeQuantity;

    /** 变动类型（采购/销售/调整） */
    @Excel(name = "变动类型", readConverterExp = "采=购/销售/调整")
    private String changeType;

    /** 变动类型名称 */
    @Excel(name = "变动类型名称")
    private String changeTypeName;

    /** 操作人 */
    @Excel(name = "操作人")
    private String operator;

    /** 变动时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "变动时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date changeTime;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public Long getProductId() {
        return productId;
    }

    public void setChangeQuantity(Long changeQuantity) {
        this.changeQuantity = changeQuantity;
    }

    public Long getChangeQuantity() {
        return changeQuantity;
    }

    public void setChangeType(String changeType) {
        this.changeType = changeType;
    }

    public String getChangeType() {
        return changeType;
    }

    public void setChangeTypeName(String changeTypeName) {
        this.changeTypeName = changeTypeName;
    }

    public String getChangeTypeName() {
        return changeTypeName;
    }

    public void setOperator(String operator) {
        this.operator = operator;
    }

    public String getOperator() {
        return operator;
    }

    public void setChangeTime(Date changeTime) {
        this.changeTime = changeTime;
    }

    public Date getChangeTime() {
        return changeTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("productId", getProductId())
                .append("changeQuantity", getChangeQuantity())
                .append("changeType", getChangeType())
                .append("operator", getOperator())
                .append("changeTime", getChangeTime())
                .append("remark", getRemark())
                .toString();
    }
}
